package com.html2rss.ui.wizard;

import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.html2rss.models.Query;

/**
 * User: VSlaykovskiy
 * Date: 13.04.2007
 * Time: 19:23:10
 */
public class SaveFeedAction extends BaseWizardAction {

    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        int feedId = Integer.parseInt(httpServletRequest.getParameter(FEED_ID));
        Query feed = getWizardNavigationHistory(httpServletRequest).getFeedSuggestions().get(feedId);
        httpServletRequest.setAttribute("feedId", feedId);


        return actionMapping.findForward("success");
    }
}
